package com.losenote.base.util;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ServiceFactory {
    private static BeanFactory factory = null;
    static {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
            new String[] { "applicationContext.xml" });
        //             ApplicationContext context = 
        //               new ClassPathXmlApplicationContext("applicationContext.xml");

        factory = context;
    }

    /** 
     * 获得用户服务类 
     * @return 用户服务 
     */
    public static BeanFactory getFactor() {
        return factory;
    }

}
